        /* 搜索栏 */
        var dYi=document.getElementsByClassName("head")[0];
        var p=dYi.querySelectorAll("a");
        //  console.log(dYi,p);
        for(var i=0;i<p.length;i++){
            p[i].onclick=function(){
                for(var j=0;j<p.length;j++){
                    p[j].classList.remove("dh");
                }
                this.classList.add("dh");
            }
        }

        /* 第一个tab */
        var show1=document.getElementsByClassName("first");
        // console.log(p,show1);
        for(var i=0;i<p.length;i++){
            p[i].index=i;
            p[i].onclick=function(){
                for(var j=0;j<p.length;j++){
                    p[j].classList.remove("dh");
                    show1[j].style.display="none";
                }
                this.classList.add("dh");
                show1[this.index].style.display="block";
            }
        }


        /* swiper1 */
        var swiper = new Swiper(".mySwiper1", {
            slidesPerView: 5.5,
            spaceBetween: 0,
            freeMode: true,
          });

          /* 第二个tab */
          var second=document.getElementsByClassName("second")[0];
          var secondbh=second.querySelectorAll("span");
          var show2=document.querySelectorAll(".neiRo");
        //   console.log(secondbh,show2);
          for(var i=0;i<secondbh.length;i++){
              secondbh[i].index=i;
              secondbh[i].onclick=function(){
                  for(var j=0;j<secondbh.length;j++){
                      secondbh[j].classList.remove("bh");
                      show2[j].style.display="none";
                  }
                  this.classList.add("bh");
                  show2[this.index].style.display="block";
              }
          }


          /* fixed */
          var fixed=document.getElementsByClassName("header")[0];
        //   console.log(fixed);
          window.onscroll=function(){
              var st=document.documentElement.scrollTop||document.body.scrollTop;
              if(st>fixed.offsetHeight){
                  fixed.style.position="fixed";
              }else{
                  fixed.style.position="static";
              }
          }


          /* json */
          var json=[{
              img1:"./img/zfx/tx1.jpg",
              h4:"白粥",
              p:"2分钟前·盒友杂谈",
              svg1:"#icon-dianzan_kuai",
              p1:"4",
              svg2:"#icon-pinglun2",
              p2:"29",
              h3:"xdm救救我sos",
              p3:"各个数据都算出来了，画图也要死掉了，救命啊！",
              img2:"./img/img/1.jpg",
          },{
            img1:"./img/zfx/tx2.jpg",
            h4:"EthereaIMG",
            p:"3分钟前·盒友杂谈",
            svg1:"#icon-dianzan_kuai",
            p1:"125",
            svg2:"#icon-pinglun2",
            p2:"129",
            h3:"老哥们，发挥想象力的时候到了",
            p3:"今天送遗迹重生，明天送啥",
            img2:"./img/img/2.jpg",
        },{
            img1:"./img/zfx/tx3.jpg",
            h4:"代号Zero",
            p:"5分钟前·盒友杂谈",
            svg1:"#icon-dianzan_kuai",
            p1:"6",
            svg2:"#icon-pinglun2",
            p2:"76",
            h3:"求推荐适合3-4人的多人游戏",
            p3:"首先排除玩过的游戏，森林 无主之地 apex 守望先锋 盗贼之海 命运2 csgo 彩虹六号 战地 无人深空 求生之路 揍击派对 怪物猎人",
            img2:"./img/img/3.jpg",
        },{
            img1:"./img/zfx/tx4.jpg",
            h4:"ma卡巴卡",
            p:"11分钟前·盒友杂谈",
            svg1:"#icon-dianzan_kuai",
            p1:"8",
            svg2:"#icon-pinglun2",
            p2:"25",
            h3:"",
            p3:"xdm,有没有这只猫的表情包啊",
            img2:"./img/zfx/IMG_2766.JPG",
        }]
        var div=document.querySelector(".show2");
        // console.log(div);
        json.forEach(function(v,i){
            var pp=document.createElement("div");
            pp.innerHTML=`
                <div class="dyh">
                    <img src="${v.img1}">
                    <div class="zuo">
                        <h4>${v.h4}</h4>
                        <p>${v.p}</p>
                    </div>
                    <div class="you">
                        <div class="xhz">
                            <svg class="icon" aria-hidden="true">
                                <use xlink:href="${v.svg1}"></use>
                            </svg>
                            <p>${v.p1}</p>
                        </div>
                        <div class="xhz">
                            <svg class="icon" aria-hidden="true">
                                <use xlink:href="${v.svg2}"></use>
                            </svg>
                            <p>${v.p2}</p>
                        </div>
                    </div>
                </div>
                <div class="deh">
                    <h3>${v.h3}</h3>
                    <p>${v.p3}</p>
                </div>
                <img src="${v.img2}" alt="">
            `;
            div.appendChild(pp);
        })